package de.fuberlin.inf.alp4.uebg5;

import java.util.Random;
import java.util.concurrent.Future;

public class Proxy {

    private Scheduler scheduler = new Scheduler();

    public Future<Integer> m1() {
    	Random r = new Random();
    	int rand = r.nextInt(20);
		M1Request request = new M1Request(scheduler.servant, rand);
		System.out.println("Created new MessageRequest M1 with Priority " + rand);
		scheduler.enqueue(request);
		return request;
    }
    
    public Future<Integer> m2() {
    	Random r = new Random();
    	int rand = r.nextInt(20);
		M2Request request = new M2Request(scheduler.servant, rand);
		System.out.println("Created new MessageRequest M2 with Priority " + rand);
		scheduler.enqueue(request);
		return request;
    }

}
